<!--
	作者：956911785@qq.com
	时间：2019年8月1日17:44:32
	描述：书籍分类-添加
-->

<template>
	<Tcontent ref="Tcontent" :teas="params" :title="title" @addsave="addsave"></Tcontent>
</template>

<script>
	import Tcontent from "./Tcontent";
	export default {
		name:"addPoetry",
		props: {
    	},
		data() {
			return {
				params:{
					pid:'', 
					dhmc:'',  
					kssj:'', 
					jssj:'', 
					pstate:'',
					totalscore:'40',
					maxpm:'10',
				},
				title:'新增诗词大会'
			}
		},
		components: {
			Tcontent
		},
		methods: {
			addsave:function(datas){
				const da={...datas};
				const params={
					dhmc:da.dhmc,  
					kssj:da.kssj, 
					jssj:da.jssj,
					pstate:da.pstate,
					totalscore:da.totalscore,
					maxpm:da.maxpm,
				};
                this.$http.post("/host/readbook/scdh/add_poetry.html",params)
				.then(result => {
					if(result){
						this.$Modal.success({
                            title: "提示",
                            content: "添加成功！"
                       });
                       this.$emit("reload");
                       this.$refs.Tcontent.closeModal();
					}else{
						this.$Modal.error({
                            title: "提示",
                            content: "添加失败，请联系管理员！"
                       });	
					}
				});
	        },
			openmodal(){
				this.$refs.Tcontent.modal0 = true;
			}
		},
		mounted() {

		},
		watch:{
			
		}
	}
</script>

<style scoped="scoped">
	
</style>



